import Fetch from "../utils/fetch";

// 首页banner图
export const banner = () => Fetch.get("/banner");
// 获取验证码
export const yzm = (data) => Fetch.post("smsCode", data);
// 短信登陆
export const login = (data) => Fetch.post("/login", data);
// 账号密码登陆
export const loginpassword = (data) => Fetch.post("/login", data);
// 设置密码
export const setpassword = (data) => Fetch.post("/password", data);
//特色课数据
export const characteristic = (data) => Fetch.get("/courseBasis", data);
//分类
export const solt = (data)=>Fetch.get('/courseBasis',data)
//搜索
export const seacha = (id)=>Fetch.get(`/courseInfo/basis_id=${id}`)
// 课程大纲
export const outline = (id) => Fetch.post(`/courseChapter?id=${id}`)

// 首页数据
export const Ly_appIndex = () => Fetch.get("/recommend/appIndex")

// 课程详情
export const Ly_detail = (id) => Fetch.get(`/courseInfo/basis_id=${id}`)

// 课程大纲
export const Ly_outline = (id) => Fetch.post(`/courseChapter?id=${id}`)

// 课程评论
export const Ly_comment = (id) => Fetch.post(`/courseComment?id=${id}`)
//左侧内容接口
export const cyjleft = () => Fetch.get('/wap/classify')
//右侧内容接口
export const cyjright = (data) => Fetch.get("/wap/quesBank/" + data.id)
//搜索接口
export const seach = (value) => Fetch.get(`/wap/search/bank?bank=${value}`)
// 获取用户信息
export const getuser = () => Fetch.get(
    "/userInfo",
)
// 获取收藏信息
export const getstart = () => Fetch.get(
    "/collect?page=1&limit=10&type=1&",
)
// 修改头像
export const upimg = (data) => Fetch.post(
    `/public/img`,
    data
)
// 修改用户信息
// 修改头像
export const edituser = (data) => Fetch.put(
    `/user`,
    data
)
// 获取省份列表
export const sheng = (data) => Fetch.get(
    `/sonArea/${data}`,
)
